import request from '@/utils/request'
// 渲染
export const getDepartmentListApi = () => {
  return request({
    url: '/company/department'
  })
}
// 删除
export function delDepartmentByIdApi (id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 添加
export const addDepartmentApi = data => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门详情
export function getDepartmentDetailApi (id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 修改部门
export function getDepartmentChangeApi (id) {
  return request({
    url: `/company/department/${id}`,
    method: 'put'
  })
}
